Integrand size = 27, antiderivative size = 214 \[ \int \left (c (d \sin (e+f x))^p\right )^n (3+3 \sin (e+f x))^2 \, dx=-\frac {9 \cos (e+f x) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{f (2+n p)}+\frac {9 (3+2 n p) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (1+n p),\frac {1}{2} (3+n p),\sin ^2(e+f x)\right ) \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n}{f (1+n p) (2+n p) \sqrt {\cos ^2(e+f x)}}+\frac {18 \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (2+n p),\frac {1}{2} (4+n p),\sin ^2(e+f x)\right ) \sin ^2(e+f x) \left (c (d \sin (e+f x))^p\right )^n}{f (2+n p) \sqrt {\cos ^2(e+f x)}} \]
-a^2*cos(f*x+e)*sin(f*x+e)*(c*(d*sin(f*x+e))^p)^n/f/(n*p+2)+a^2*(2*n*p+3)* cos(f*x+e)*hypergeom([1/2, 1/2*n*p+1/2],[1/2*n*p+3/2],sin(f*x+e)^2)*sin(f* x+e)*(c*(d*sin(f*x+e))^p)^n/f/(n*p+1)/(n*p+2)/(cos(f*x+e)^2)^(1/2)+2*a^2*c os(f*x+e)*hypergeom([1/2, 1/2*n*p+1],[1/2*n*p+2],sin(f*x+e)^2)*sin(f*x+e)^ 2*(c*(d*sin(f*x+e))^p)^n/f/(n*p+2)/(cos(f*x+e)^2)^(1/2)
Time = 0.43 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.02 \[ \int \left (c (d \sin (e+f x))^p\right )^n (3+3 \sin (e+f x))^2 \, dx=-\frac {9 \cos (e+f x) \sqrt {\cos ^2(e+f x)} \sin (e+f x) \left (c (d \sin (e+f x))^p\right )^n \left (\left (6+5 n p+n^2 p^2\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (1+n p),\frac {1}{2} (3+n p),\sin ^2(e+f x)\right )+(1+n p) \sin (e+f x) \left (2 (3+n p) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+\frac {n p}{2},2+\frac {n p}{2},\sin ^2(e+f x)\right )+(2+n p) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (3+n p),\frac {1}{2} (5+n p),\sin ^2(e+f x)\right ) \sin (e+f x)\right )\right )}{f (1+n p) (2+n p) (3+n p) (-1+\sin (e+f x)) (1+\sin (e+f x))} \]
(-9*Cos[e + f*x]*Sqrt[Cos[e + f*x]^2]*Sin[e + f*x]*(c*(d*Sin[e + f*x])^p)^ n*((6 + 5*n*p + n^2*p^2)*Hypergeometric2F1[1/2, (1 + n*p)/2, (3 + n*p)/2, Sin[e + f*x]^2] + (1 + n*p)*Sin[e + f*x]*(2*(3 + n*p)*Hypergeometric2F1[1/ 2, 1 + (n*p)/2, 2 + (n*p)/2, Sin[e + f*x]^2] + (2 + n*p)*Hypergeometric2F1 [1/2, (3 + n*p)/2, (5 + n*p)/2, Sin[e + f*x]^2]*Sin[e + f*x])))/(f*(1 + n* p)*(2 + n*p)*(3 + n*p)*(-1 + Sin[e + f*x])*(1 + Sin[e + f*x]))
Time = 0.64 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.09, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {3042, 3305, 3042, 3242, 3042, 3227, 3042, 3122}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sin (e+f x)+a)^2 \left (c (d \sin (e+f x))^p\right )^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^2 \left (c (d \sin (e+f x))^p\right )^ndx\) |
\(\Big \downarrow \) 3305 |
\(\displaystyle (d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n \int (d \sin (e+f x))^{n p} (\sin (e+f x) a+a)^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n \int (d \sin (e+f x))^{n p} (\sin (e+f x) a+a)^2dx\) |
\(\Big \downarrow \) 3242 |
\(\displaystyle (d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n \left (\frac {\int (d \sin (e+f x))^{n p} \left (d (2 n p+3) a^2+2 d (n p+2) \sin (e+f x) a^2\right )dx}{d (n p+2)}-\frac {a^2 \cos (e+f x) (d \sin (e+f x))^{n p+1}}{d f (n p+2)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n \left (\frac {\int (d \sin (e+f x))^{n p} \left (d (2 n p+3) a^2+2 d (n p+2) \sin (e+f x) a^2\right )dx}{d (n p+2)}-\frac {a^2 \cos (e+f x) (d \sin (e+f x))^{n p+1}}{d f (n p+2)}\right )\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle (d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n \left (\frac {a^2 d (2 n p+3) \int (d \sin (e+f x))^{n p}dx+2 a^2 (n p+2) \int (d \sin (e+f x))^{n p+1}dx}{d (n p+2)}-\frac {a^2 \cos (e+f x) (d \sin (e+f x))^{n p+1}}{d f (n p+2)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n \left (\frac {a^2 d (2 n p+3) \int (d \sin (e+f x))^{n p}dx+2 a^2 (n p+2) \int (d \sin (e+f x))^{n p+1}dx}{d (n p+2)}-\frac {a^2 \cos (e+f x) (d \sin (e+f x))^{n p+1}}{d f (n p+2)}\right )\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle (d \sin (e+f x))^{-n p} \left (c (d \sin (e+f x))^p\right )^n \left (\frac {\frac {a^2 (2 n p+3) \cos (e+f x) (d \sin (e+f x))^{n p+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (n p+1),\frac {1}{2} (n p+3),\sin ^2(e+f x)\right )}{f (n p+1) \sqrt {\cos ^2(e+f x)}}+\frac {2 a^2 \cos (e+f x) (d \sin (e+f x))^{n p+2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (n p+2),\frac {1}{2} (n p+4),\sin ^2(e+f x)\right )}{d f \sqrt {\cos ^2(e+f x)}}}{d (n p+2)}-\frac {a^2 \cos (e+f x) (d \sin (e+f x))^{n p+1}}{d f (n p+2)}\right )\) |
((c*(d*Sin[e + f*x])^p)^n*(-((a^2*Cos[e + f*x]*(d*Sin[e + f*x])^(1 + n*p)) /(d*f*(2 + n*p))) + ((a^2*(3 + 2*n*p)*Cos[e + f*x]*Hypergeometric2F1[1/2, (1 + n*p)/2, (3 + n*p)/2, Sin[e + f*x]^2]*(d*Sin[e + f*x])^(1 + n*p))/(f*( 1 + n*p)*Sqrt[Cos[e + f*x]^2]) + (2*a^2*Cos[e + f*x]*Hypergeometric2F1[1/2 , (2 + n*p)/2, (4 + n*p)/2, Sin[e + f*x]^2]*(d*Sin[e + f*x])^(2 + n*p))/(d *f*Sqrt[Cos[e + f*x]^2]))/(d*(2 + n*p))))/(d*Sin[e + f*x])^(n*p)
3.9.21.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b^2)*Cos[e + f*x]*(a + b*Sin[e + f*x ])^(m - 2)*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n))), x] + Simp[1/(d*(m + n)) Int[(a + b*Sin[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^n*Simp[a*b*c* (m - 2) + b^2*d*(n + 1) + a^2*d*(m + n) - b*(b*c*(m - 1) - a*d*(3*m + 2*n - 2))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1] && !LtQ[ n, -1] && (IntegersQ[2*m, 2*n] || IntegerQ[m + 1/2] || (IntegerQ[m] && EqQ[ c, 0]))
Int[((c_.)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(p_))^(n_)*((a_.) + (b_.)*sin[(e _.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Simp[c^IntPart[n]*((c*(d*Sin[e + f*x ])^p)^FracPart[n]/(d*Sin[e + f*x])^(p*FracPart[n])) Int[(a + b*Sin[e + f* x])^m*(d*Sin[e + f*x])^(n*p), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && !IntegerQ[n]
\[\int \left (c \left (d \sin \left (f x +e \right )\right )^{p}\right )^{n} \left (a +a \sin \left (f x +e \right )\right )^{2}d x\]
\[ \int \left (c (d \sin (e+f x))^p\right )^n (3+3 \sin (e+f x))^2 \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{2} \left (\left (d \sin \left (f x + e\right )\right )^{p} c\right )^{n} \,d x } \]
\[ \int \left (c (d \sin (e+f x))^p\right )^n (3+3 \sin (e+f x))^2 \, dx=a^{2} \left (\int \left (c \left (d \sin {\left (e + f x \right )}\right )^{p}\right )^{n}\, dx + \int 2 \left (c \left (d \sin {\left (e + f x \right )}\right )^{p}\right )^{n} \sin {\left (e + f x \right )}\, dx + \int \left (c \left (d \sin {\left (e + f x \right )}\right )^{p}\right )^{n} \sin ^{2}{\left (e + f x \right )}\, dx\right ) \]
a**2*(Integral((c*(d*sin(e + f*x))**p)**n, x) + Integral(2*(c*(d*sin(e + f *x))**p)**n*sin(e + f*x), x) + Integral((c*(d*sin(e + f*x))**p)**n*sin(e + f*x)**2, x))
\[ \int \left (c (d \sin (e+f x))^p\right )^n (3+3 \sin (e+f x))^2 \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{2} \left (\left (d \sin \left (f x + e\right )\right )^{p} c\right )^{n} \,d x } \]
\[ \int \left (c (d \sin (e+f x))^p\right )^n (3+3 \sin (e+f x))^2 \, dx=\int { {\left (a \sin \left (f x + e\right ) + a\right )}^{2} \left (\left (d \sin \left (f x + e\right )\right )^{p} c\right )^{n} \,d x } \]
Timed out. \[ \int \left (c (d \sin (e+f x))^p\right )^n (3+3 \sin (e+f x))^2 \, dx=\int {\left (c\,{\left (d\,\sin \left (e+f\,x\right )\right )}^p\right )}^n\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^2 \,d x \]